-- GENERATED SPELL FOR [Fordragon Battle Mage] --


function spell0_27695(pUnit, Event) --@Arcane Tempest,Self--
pUnit:FullCastSpellOnTarget(49365,pUnit)
pUnit:RegisterEvent('Sorts_27695', 4500, 1)
end

function spell1_27695(pUnit, Event) --@Blast Wave,Self--
pUnit:FullCastSpellOnTarget(38064,pUnit)
pUnit:RegisterEvent('Sorts_27695', 6278, 1)
end

function spell2_27695(pUnit, Event) --@Pyroblast,n/a--
pUnit:FullCastSpellOnTarget(17274,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27695', 18000, 1)
end

function Sorts_27695(pUnit, Event)
local choix_sorts_27695 = math.random(0, 2)
if choix_sorts_27695 == 0 then
pUnit:RegisterEvent('spell0_27695', 1, 1)
end
if choix_sorts_27695 == 1 then
pUnit:RegisterEvent('spell1_27695', 1, 1)
end
if choix_sorts_27695 == 2 then
pUnit:RegisterEvent('spell2_27695', 1, 1)
end
end

function mob27695_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_27695', math.random(1500, 3000), 1)
end

function mob27695_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27695_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27695_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(27695, 1, 'mob27695_Action')
RegisterUnitEvent(27695, 2, 'mob27695_Leave')
RegisterUnitEvent(27695, 3, 'mob27695_Kill')
RegisterUnitEvent(27695, 4, 'mob27695_Die')
